<html>
	<head>
		<meta charset="utf-8"/>
		<script src="../static/jquery.js"></script>
	</head>
	
	<body>
		测试user.add
		<button id="test">发送数据</button>
		<script>
document.getElementById("test").onclick = function(){
	var data = {
		"username1":"yanyi",
		"password1":"123456",
		"gender":"1"
	}
	$.ajax({
		url: "http://smarty-wh/index.php/User/add",
		method: "post",
		data:JSON.stringify(data),
		type: "json",
		success:function(ret){
			alert(ret.message);
			alert("新添的用户id:" + ret.data.id);
		},
		error:function(e){
			alert(e)
			console.error(e)
		}
	});
}
		</script>
	</body>
</html>